{include file="common/Header.html"}
<body class="body-main">
<div class="admin_notice"><span>管理操作：</span><a href="{'Admin/Arctype/edit'|url}">添加分类</a>　┊　<a href="{'Admin/Arctype/index'|url}">分类管理</a></div>
<br>
<ul id="admin_sub_title">
	<li class="sub"><a>{if $id==0}添加{else}编辑{/if}分类</a></li>
</ul>

<div id="admin_right_b">
  <form method="post">
    <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" id="tagContent0">
	<tr>
      <td width="120" align="right" class="tdbg">分类名称：</td>
	  <input type="hidden" name="con[id]" value="{$id|default:0}">
      <td class="tdbg"><input name="con[cname]" type="text" value="{$cname}" class="input" size="30"></td>
    </tr>

	<tr>
      <td width="120" align="right" class="tdbg">上级分类：</td>
      <td class="tdbg"><select name="con[pid]">
		<option value="0">顶级分类</option>
		{$class_option}
		</select></td>
    </tr>

	<tr>
      <td width="120" align="right" class="tdbg">排序：</td>
      <td class="tdbg"><input name="con[order]" type="text" value="{$order|default:1}" class="input" size="30"> 数字越大越前面</td>
    </tr>

	<tr>
      <td width="120" align="right" class="tdbg">前台显示：</td>
      <td class="tdbg"><input name="con[isshow]" type="radio" value="1" {if $isshow==1 or $isshow==''}checked{/if} />显示 
				<input name="con[isshow]" type="radio" value="0" {if $isshow=='0'}checked{/if}/>隐藏</td>
    </tr>

	<tr>
      <td width="120" align="right" class="tdbg">关键词：</td>
      <td class="tdbg"><input name="con[keywords]" type="text" value="{$keywords}" class="input" size="30"></td>
    </tr>

    <tr class="tdbg">
      <td align="center">分类简介</td>
      <td valign="top"><textarea id="body" name="con[description]" style="width:630px;height:80px;" >{$description}</textarea>
	  </td>
    </tr>
	<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" >
		<tr class="tdbg">
		  <td width="100">&nbsp;</td>
		  <td><div class="aui_buttons"  style="text-align:left;"><button type="submit" id="dosave" class="aui_state_highlight">保存</button><button type="reset" class="aui_state_highlight">重置</button><button type="button" onClick="history.go(-1)" class="aui_state_highlight">返回</button></div></td>
		</tr>
	</table>
 </form>
<script type="text/javascript">
$("#dosave").click(function(){
		showDialog();
		$.ajax({
			type:"post",
			url:"{'Admin/Arctype/update'|url}",
			data:$("form").serialize(),
			dataType:'json',
			timeout:28000,
			global:false,
			success:function(data){
				if(data.status==1){
					showAlert('success','恭喜你，修改成功',"{'Admin/Arctype/index'|url}");
				}else{
					showAlert('error',data.info);
				}
			}
		});
	 return false;
	});
</script>
<div class="runtime"></div>  
</div>
</body>
</html>